-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Two phase download #675
Two phase download #675
Conversation
Codecov Report
@@ Coverage Diff @@
## master #675 +/- ##
==========================================
- Coverage 90.45% 90.39% -0.07%
==========================================
Files 50 50
Lines 1750 1790 +40
Branches 227 236 +9
==========================================
+ Hits 1583 1618 +35
- Misses 163 167 +4
- Partials 4 5 +1
Continue to review full report at Codecov.
|
) | ||
ctx.body = stream | ||
const { courseId } = ctx.request.body | ||
const username = ctx.state.user.username |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ctx.state.user.id
const randomToken = JSON.stringify( | ||
crypto.randomBytes(100).toString("hex"), | ||
) | ||
await redis.client.set(username, randomToken, "EX", 600) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
key: download-token-${randomToken}
, value: {valid: true}
No description provided.